<?php
/**
 * 2016.8.8 作业八
 * User: wuz
 * Date: 2016/8/8
 * Time: 16:40
 */

/*不用第三个变量交换两个变量的值
 * intSwao（）数字交换 strSwap（）字符串交换
 * */
class ExampleEight
{
    public function intSwap($numA, $numB)
    {
        $numA = $numA - $numB;
        $numB = $numB + $numA;
        $numA = $numB - $numA;
        return $numA . "/" . $numB;

    }
    public function strSwap($strA, $strB)
    {
        $strA .= $strB;
        $strB = str_replace($strB, "", $strA);
        $strA = str_replace($strB, "", $strA);
        return $strA . "/" . $strB;
    }
}
